package main

import "fmt"

func main() {
	var intChan chan int
	intChan = make(chan int, 3)
	//看看chan是啥
	fmt.Println(intChan) //0xc00008e080
	//向管道写入数据
	intChan <- 10
	a := 15
	intChan <- a
	//查看chan长度和cap（容量）
	fmt.Printf("channle len:%v  cap:%v ", len(intChan), cap(intChan))
	//从管道读取数据
	var b int
	b = <-intChan
	fmt.Println(b)
	fmt.Println(len(intChan))
}
